package com.zuipin.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.zuipin.entity.Prize;
import com.zuipin.mapper.PrizeMapper;
import com.zuipin.service.IPrizeService;

/**
 * @ClassName: DrawLevelGroupServiceImpl
 * @author xujinding
 * @time 2017年3月27日下午4:02:26
 */
@Service
public class PrizeServiceImpl implements IPrizeService {
	
	@Resource
	private PrizeMapper prizeMapper;
	
	public List<Prize> findAllPrizeByGroupIds(List<Long> ids) {
		return prizeMapper.findAllPrizeByGroupIds(ids);
	}
	
	public void updatePrize(Prize prize) {
		prizeMapper.updateByPrimaryKeySelective(prize);
	}
	
	public void updateUseNumPrize(Prize prize, Integer num) {
		prizeMapper.updateUseNumPrize(prize.getId(), num);
	}
}